package teach.day04;

import java.util.Collections;
import java.util.Scanner;
import java.util.Vector;

public class P03Vector {
    public static void main(String[] args) {
        Vector<Integer> v = new Vector<>();
        Scanner cin = new Scanner(System.in);
        while (cin.hasNext()) {
            int x = cin.nextInt();
            if (v.indexOf(x) >= 0) {
                continue;
            }
            v.add(x);
        }
        System.out.println(v);

        Collections.sort(v);//排序
        System.out.println(v);
        for (Integer i : v) {
            System.out.println(i);
        }
        for (int i = 0; i < v.size(); i++) {
            System.out.println(v.get(i));       //v[i]
        }
        v.set(0, 7);
    }
}
